<template>
  <div class="home">
    <van-grid>
      <van-grid-item v-for="(item,index) in appList" :key="index" icon="photo-o" :to="item.path" :text="item.appName" />
  </van-grid>
  </div>
</template>

<script lang="ts">
import { defineComponent,onMounted,reactive,toRefs } from 'vue';
import { get } from "@/api/http";
export default defineComponent({
  name: 'Home',
  components: {
  },
  setup(){
    const state = reactive({
     appList:''
    });
    const getAppList = async ()=>{
      var res:any = await get("/getModule");
      state.appList =res.data;
    }
    onMounted(() => {
        getAppList();
    });
    return{
      ...toRefs(state)
    }
  }
});
</script>
<style lang="less">

</style>